package portal.entidades;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "Usuarios")
public class Usuario implements Serializable {

	private static final long serialVersionUID = 1117338402102192212L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "Id_Usuario")
	private Long id;

	@Column(name = "Nombre")
	private String nombre;

	@Column(name = "Apellido")
	private String apellido;

	@Column(name = "Email")
	private String email;

	@Column(name = "Password")
	private String password;

	@Column(name = "CordenadaX")
	private double cordenadaX;

	@Column(name = "CordenadaY")
	private double cordenadaY;

	@OneToMany
	private List<Compra> compras;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getNombre() {
		return nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}

	public String getApellido() {
		return apellido;
	}

	public void setApellido(String apellido) {
		this.apellido = apellido;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public List<Compra> getCompras() {
		return compras;
	}

	public void setCompras(List<Compra> compras) {
		this.compras = compras;
	}

	public double getCordenadaX() {
		return cordenadaX;
	}

	public void setCordenadaX(double cordenadaX) {
		this.cordenadaX = cordenadaX;
	}

	public double getCordenadaY() {
		return cordenadaY;
	}

	public void setCordenadaY(double cordenadaY) {
		this.cordenadaY = cordenadaY;
	}

}
